package com.gavindon.android.repo

import com.gavindon.android.base.BaseRepository
import com.gavindon.android.entity.HotTagResult
import com.gavindon.android.entity.SearchResp
import com.gavindon.android.entity.SmartEducationContentResp
import com.gavindon.android.network.DataResult

/**
 * description:
 * Created by liNan on  2022-2-12 13:00
 */
class SearchRepo : BaseRepository() {

    suspend fun getHotSearch(): DataResult<List<HotTagResult>> {
        return launchRequest { service.searchFindHotVocabulary() }
    }

    suspend fun getSearchRaking(): DataResult<List<SmartEducationContentResp>> {
        return launchRequest { service.searchFindHotCourse() }
    }

    suspend fun getSearchResult(pinyin: String, word: String): DataResult<List<SearchResp>> {
        return launchRequest { service.clientCourseSearch(pinyin, word) }
    }


}